package net.pimpas.web.jsf.components.ajax.populate;

import javax.faces.component.UIComponent;

import net.pimpas.web.jsf.components.ajax.UIAjaxTag;

public class UIAjaxPopulateTag extends UIAjaxTag {
	
	private String skipValidatorFor;
	private Boolean skipAllValidators;
	
	@Override
	protected void setProperties(UIComponent component) {
		super.setProperties(component);
		
		UIAjaxPopulate populate = (UIAjaxPopulate) component;
		populate.setSkipAllValidators((this.getSkipAllValidators()==null) ? Boolean.TRUE : this.getSkipAllValidators());
		populate.setSkipValidatorFor(this.getSkipValidatorFor()); 
	}
	
	@Override
	public String getComponentType() {
		return UIAjaxPopulate.COMPONENT_TYPE;
	}


	public Boolean getSkipAllValidators() {
		return skipAllValidators;
	}


	public void setSkipAllValidators(Boolean skipAllValidators) {
		this.skipAllValidators = skipAllValidators;
	}


	public String getSkipValidatorFor() {
		return skipValidatorFor;
	}


	public void setSkipValidatorFor(String skipValidatorFor) {
		this.skipValidatorFor = skipValidatorFor;
	}
}